<div class="mainWarpArea">
    <!-- Begin BannerArea -->
    <div class="BannerArea">
      <div class="base">
        <div class="inside">
          <div class="transbox">
            <h1>Lorem ipsum dolor sit amet, consectetuer a</h1>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </p>
          </div>
        </div>
        <div class="hm_rotator">
          <div id="divMainRotator"> <a href="#" target="_self" title=""><img src="images/BannerImg1.jpg" alt="" title="" /></a><a href="#" target="_self" title=""><img src="images/BannerImg1.jpg" alt="" title="" /></a><a href="#" target="_self" title=""><img src="images/BannerImg1.jpg" alt="" title="" /></a><a href="#" target="_self" title=""><img src="images/BannerImg1.jpg" alt="" title="" /></a></div>
          <!--  <div id="divMainRotatorNav"></div>-->
        </div>
      </div>
    </div>
    <!-- End BannerArea -->
    <!-- Begin latestnewsBox -->
    <div class="latestnewsBox" id="marquee_txt"></div>
    <!-- End latestnewsBox -->
    <!-- Begin contentwarp -->
    <div class="contentwarp">
      <!-- Begin contentwarpLeft -->
      <div class="contentwarpLeft">
        <!-- Begin videoBox -->
        <div  class="videoBox"><img src="images/videoBgs.jpg" width="295" height="212" alt="" /></div>
        <!-- End videoBox -->
        <!-- Begin TapBoxs -->
        <div class="TapBoxs">
          <div id="TabbedPanels1" class="TabbedPanels">
            <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab" tabindex="0">BOOKS</li>
              <li class="TabbedPanelsTab" tabindex="0">TECHNOLOGY</li>
              <li class="TabbedPanelsTab" tabindex="0">JOBS</li>
            </ul>
            <div class="TabbedPanelsContentGroup">
              <div class="TabbedPanelsContent"><br />
              <form action="index.php?page=books&view=result" method="post" onsubmit="return validate();" autocomplete="off">
               
                 <div align="center"> 
                <input id="search_query" name="search_query"   type="text" style=" background-color:#F7F7F7; 
                border:#DCDCDC solid 1px; height:30px; width:250px; color:#999999;"
                onblur="if (this.value == '') {this.value = 'Enter Title,Author Name ,ISBN';}" 
                onfocus="if (this.value == 'Enter Title,Author Name,ISBN') {this.value = '';}" 
                 value="Enter Title,Author Name,ISBN" />
               
               <div align="left"><br />&nbsp;&nbsp;&nbsp;<input type="radio" checked="checked" name="val" />Title<input type="radio"  name="val" />Author<input type="radio"  name="val" />ISBN</div>
               
                </div>
                
                <div align="right" style="margin-top:20px;">
                <input name="commit" value="Search" type="image" src="images/submit_button.png" ></div>
            </form>
              </div>
              <div class="TabbedPanelsContent"><br />
              <form name="techsearch" method="post" action="" onsubmit="return val_tech();" autocomplete="off">
               <div align="center"> 
                <input id="search_tech" name="search_tech"   type="text" style=" background-color:#F7F7F7; 
                border:#DCDCDC solid 1px; height:30px; width:250px; color:#999999;"
                onblur="if (this.value == '') {this.value = 'Enter Gadget,Make,Techonology';}" 
                onfocus="if (this.value == 'Enter Gadget,Make,Techonology') {this.value = '';}" 
                 value="Enter Gadget,Make,Techonology" />
                </div>
                
                <div align="right" style="margin-top:20px;">
                <input name="commit" value="Search" type="image" src="images/submit_button.png" >
                </div>
              </form>
              </div>
              <div class="TabbedPanelsContent"><br />
              <form name="jobsearch" method="post" action="" onsubmit="return val_job();" autocomplete="off">
               <div align="center">
                <input id="search_job" name="search_job"   type="text" style=" background-color:#F7F7F7; 
                border:#DCDCDC solid 1px; height:30px; width:250px; color:#999999;"
                onblur="if (this.value == '') {this.value = 'Enter Job,Title,Sector,Location';}" 
                onfocus="if (this.value == 'Enter Job,Title,Sector,Location') {this.value = '';}" 
                 value="Enter Job,Title,Sector,Location" />
                 <br /><br />
                  <select name="list_job" id="list_job" style=" background-color:#F7F7F7; 
                border:#DCDCDC solid 1px; height:30px; width:250px; color:#999999;" >
                 <?php 
				
				echo $base_obj->listJob();
				 ?></select>
                 
                 <br /><br />
                  <select name="list_area" id="list_area" style=" background-color:#F7F7F7; 
                border:#DCDCDC solid 1px; height:30px; width:250px; color:#999999;" >
                 <?php 
				
				echo $base_obj->listarea();
				 ?></select>
                 
                </div>
                
                <div align="right" style="margin-top:20px;">
                <input name="commit" value="Search" type="image" src="images/submit_button.png" >
                </div>
              </form>
              </div>
            </div>
          </div>
        </div>
        <!-- End TapBoxs -->
        <!-- Begin leftadBox -->
        <div class="leftadBox"><img src="images/thinkingsageBox.jpg" width="295" height="93" alt="" /></div>
        <!-- End leftadBox -->
      </div>
      <!-- End contentwarpLeft -->
      <!-- Begin contentwarpMiddle -->
		<?php
		$sql = "SELECT a.id,section_name,content FROM ".$base_obj->SECTION." a INNER JOIN ".$base_obj->PAGE." b 
				ON(a.page_name = b.id AND b.active_status = '1') 
				WHERE section_name = 'Welcome to Studysage'";
		
		$res = $base_obj->exec_query($sql);
		$data = $base_obj->fetch_row($res);
		?>
      <div class="contentwarpMiddle">
        <h1><?php echo $data['section_name']?></h1>
        <?php echo $data['content']?>
        <span class=" wel"><a href="index.php?page=sub_page&sec_id=<?php echo $data['id'];?>">read more »</a></span>
        <div class="MiddleBox">
          <h2>Education Centre New!</h2>
          <div class="MiddleBoxDiv">
            <table width="420" border="0" cellspacing="3" cellpadding="3" align="center">
              <tr>
                <td rowspan="3" valign="top"><img src="images/img1.jpg" width="112" height="76" alt="" /></td>
                <td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit,</td>
              </tr>
              <tr>
                <td align="right"><a href="#">Online from Open Universities</a></td>
              </tr>
              <tr>
                <td align="right"><a href="#">readmore</a></td>
              </tr>
            </table>
          </div>
          <div class="MiddleBoxDiv">
            <table width="420" border="0" cellspacing="3" cellpadding="3" align="center">
              <tr>
                <td rowspan="3" valign="top"><img src="images/img1.jpg" width="112" height="76" alt="" /></td>
                <td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit,</td>
              </tr>
              <tr>
                <td align="right"><a href="#">Online from Open Universities</a></td>
              </tr>
              <tr>
                <td align="right"><a href="#">readmore</a></td>
              </tr>
            </table>
          </div>
          <div class="wel1"> <a href="#">More Education Centre   »</a> </div>
          <p id="no">Lorem ipsum dolor sit amet, consectetuer adipiscing elit,Lorem ipsum dolor sit amet, consectetuer adipiscing elit,Lorem ipsum dolor sit amet, consectetuer adipiscing elit,</p>
        </div>
      </div>
      <!-- End contentwarpMiddle -->
      <?php include("includes/right_content.php");?>
      <div class="BottomBox">

	  <?php
		$sql = "SELECT a.id, section_name,content FROM ".$base_obj->SECTION." a 
				INNER JOIN ".$base_obj->PAGE." b 
				ON(a.page_name = b.id AND b.active_status = '1') 
				WHERE section_name != 'Welcome to Studysage' AND a.active_status = '1'";
		
		$res = $base_obj->exec_query($sql);
		$data = $base_obj->fetch_row_all($res);
		
		for($i=0;$i<count($data);$i++) {
	  ?>
        <div class="BottomBoxIn" >
          <h1><?php echo $data[$i]['section_name']?></h1>
          <p><?php echo substr(strip_tags(stripslashes($data[$i]['content']),"<img>"),0,150)."...";?></p>
          <a href="index.php?page=sub_page&sec_id=<?php echo $data[$i]['id'];?>">read more  »</a> </div>
	  <?php } ?>
      </div>
      <!-- End contentwarp -->
      <div style="clear:both;"></div>
    </div>
  </div>

<script language="JavaScript1.2">
<?php
$news_heading = $base_obj->getNewsHeadLines();

for($i=0;$i<count($news_heading);$i++) {
	if($i == (count($news_heading)-1)) {
		$headline .= '<a href="index.php?page=technology&view=news&news_id='.$news_heading[$i]['Id'].'">'.$news_heading[$i]['title']."</a>";
	}
	else {
		$headline .= '<a href="index.php?page=technology&view=news&news_id='.$news_heading[$i]['Id'].'">'.$news_heading[$i]['title']."</a>, ";	
	}
}
?>
/*
Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="750px"
//Specify the marquee's height
var marqueeheight="20px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor=""
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

var scroll_text;
//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><?php echo $headline;?></a>  </nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
//document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
scroll_text = '<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>';

var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
	if (iedom){
	cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
	cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
	cross_marquee.innerHTML=marqueecontent
	actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
	}
	else if (document.layers){
	ns_marquee=document.ns_marquee.document.ns_marquee2
	ns_marquee.left=parseInt(marqueewidth)+8
	ns_marquee.document.write(marqueecontent)
	ns_marquee.document.close()
	actualwidth=ns_marquee.document.width
	}
	lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
scroll_text += '<div class="latestnewsBoxIn">';
if (iedom){
scroll_text += '<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">';
scroll_text += '<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">';
scroll_text += '<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>';
scroll_text += '</div></div>';
}
else if (document.layers){
scroll_text += '<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>';
scroll_text += '<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>';
scroll_text += '</ilayer>';
}
scroll_text += '</div>';
}
document.getElementById('marquee_txt').innerHTML = scroll_text;
}
</script> 
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
<script type="text/javascript">
  $j(document).ready(function(){
    //Setup the main rotater on the home page
    $j('#divMainRotator').cycle({
      speed:       600,
      timeout:     4000,
      pager:      '#divMainRotatorNav',
      pagerEvent: 'mouseover',
      fastOnEvent: true
    });
  });
</script>

<script language="javascript">
function val_tech()
{
var search_tech = $('#search_tech').val();
if(search_tech == "Enter Gadget,Make,Techonology") {
document.getElementById("search_tech").style.border="solid #F00 2px";
document.getElementById('search_tech').focus();
return false;
}
else
{
	
	document.techsearch.action = "index.php?page=technology&mode=view&srch_id="+search_tech;
	document.techsearch.method="post";
	document.techsearch.submit();

}
}

function val_job()
{
var search_job = $('#search_job').val();
var list_area = $('#list_area').val();
var list_job = $('#list_job').val();
if(search_job == "Enter Job,Title,Sector,Location") {
document.getElementById("search_job").style.border="solid #F00 2px";
document.getElementById('search_job').focus();
return false;
}
else
{
	
	document.jobsearch.action = "index.php?page=view_job&s_id="+search_job+"&area_id="+list_area+"&list_job="+list_job;
	document.jobsearch.method="post";
	document.jobsearch.submit();

}
}

function validate()
{
var search_query = $('#search_query').val();

if(search_query == "Enter Title,Author Name,ISBN") {
document.getElementById("search_query").style.border="solid #F00 2px";
document.getElementById('search_query').focus();
return false;
}
	
}
</script>